Video encoding and decoding using parallel processors

ABSTRACT

A method is disclosed for the decoding and encoding of a block-based video bit-stream such as MPEG2, H.264-AVC, VC1, or VP6 using a system containing one or more high speed sequential processors, a homogenous array of software configurable general purpose parallel processors, and a high speed memory system to transfer data between processors or processor sets. This disclosure includes a method for load balancing between the two sets of processors.

RELATED APPLICATIONS

This application claims priority from U.S. Provisional application No. 61/002,972 filed Nov. 15, 2007 and incorporated herein by this reference.

COPYRIGHT NOTICE

© 2007-2008 Elemental Technologies, Inc. A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure, as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever. 37 CFR § 1.71(d).

TECHNICAL FIELD

This invention pertains to methods and apparatus for decoding or encoding video data using one or more sequential processors together with a group or groups of parallel general purpose SIMD processors.

BACKGROUND OF THE INVENTION

Encoding and decoding systems and methods for MPEG and other block-based video bit-stream data are now widely known. The fundamentals are well summarized in U.S. Pat. No. 6,870,883 (“Iwata”), incorporated herein by this reference. Iwata discloses a three-processor system and method for video encoding and decoding, to achieve a modicum of parallelism and improved performance over a strictly sequential solution. the interdependency of bits or blocks of the video frame. It is also difficult to maximize the performance by keeping all processors as busy as possible due to differing requirements of the processors.

One property of video is that for any given block of pixels (e.g. macroblock) in the video frame, there is a high correlation to neighboring blocks. Video compression technologies take advantage of this through the use of prediction. When the video is encoded, the encoder predicts block properties based on neighboring blocks and then encodes the difference (residual) from the prediction. The video decoder computes the same prediction and adds the residual to the prediction to decompress the video. Since only residuals to the predictions are sent, the amount of information sent between the encoder and the decoder is compressed. One drawback to having block properties predicted based off neighboring blocks is that if a neighboring block contains an error, for example due to interference during a broadcast, then all subsequent blocks will also contain an error causing an entire frame of video to be corrupted. For this reason, these video compression standards contain a notion of a slice.

A “slice” of video data contains a set of blocks that can be decoded without any other neighboring block information (from outside the slice). At each slice, the predictors are reset, trading off compression efficiency for error resilience. The majority of encoded MPEG2 content, for example, uses one slice per line of blocks. If an error is introduced in any given block, the system can recover on the next line of blocks.

Two other properties of video that allow it to be compressed are these: high frequency information can be discarded without the human vision system detecting a noticeable change in the results; and, motion tends to be localized to certain areas of the picture. Video compression standards take advantage of these two properties by a method called quantization and motion estimation/motion compensation, respectively.

Finally, to further compress the video data, a lossless variable length encoding scheme is used in video compression technologies. These methods may even use a context adaptive algorithm causing further dependency on data previously encoded or decoded in the data stream.

Some known solutions utilize multiple sequential processors or arrays of processors connected by a network such as Ethernet or high speed memory interface. These solutions suffer in efficiency from insufficient number of processors, and memory bandwidth/latency in sending data to all the processors.

Other proposals for parallelizing video decoding and encoding have been proposed such as that disclosed in U.S. Pat. No. 6,870,883 which describes a system for decoding video using multiple processors. That system requires the computationally expensive ability to transfer data to and from processors at each macroblock.

The need remains for improvements in methods and systems for video data processing to improve throughput while maintaining video quality and controlling costs.

SUMMARY OF THE INVENTION

In general, the present disclosure concerns improvements in video encoding/decoding technology. In one embodiment, improvements can be achieved by using two different processor systems, namely a Sequential Processor Array (“SPA”) and a Parallel Processor Array (“PPA”). The SPA and PPA encode/decode a video stream in a predefined, coordinated manner. In one illustrative system, in a decoder, a sequential processor array is provided comprising at least one general purpose sequential processor and arranged to receive a video data input stream; and a general purpose parallel processor array is provided. A data bus interconnects the sequential processor array and the parallel processor array. A first memory is coupled to the sequential processor array to store SPA program instructions, Macroblock coefficient data and Macroblock metadata produced by the SPA from incoming video data. A second memory is coupled to the parallel processor array and is arranged for storing PPA program instructions and macroblock coefficient data, macroblock metadata, reference frame data and output video frame data.

Additional aspects and advantages of this invention will be apparent from the following detailed description of preferred embodiments, which proceeds with reference to the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a simplified block diagram illustrating a multi-processor video decompression/compression system architecture consistent with the present invention.

FIG. 2 is a simplified flow diagram illustrating a method of parallel variable length decode of encoded video data using an array of general purpose sequential processors.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

With the advent of general purpose multi-core processors from Intel or AMD which have either 2, 4 or 8 processors and massively multi-processor systems such as NVIDIA's G80 GPU which, as of this writing, contains up to 128 SIMD (single instruction, multiple data) processors, a relatively inexpensive commodity desktop PC can provide a massive amount of processing power. What is needed, and is described herein, are methods for utilizing systems that include sequential and parallel processors so as to greatly enhance the speed and efficiency of decoding and decompression of block-based video data. The decompressed video frames can then be displayed on a computer or television screen, or used in further video processing such as image enhancement, scaling, or encoding for re-transmission.

Our invention in various embodiments takes advantage of slices and other independent portions of the video to greatly increase the coding speed and efficiency. In one presently preferred embodiment, our methods can be used in a system of the general type illustrated in FIG. 1, containing a sequential processor array (“SPA” 101) and a Parallel Processor Array (“PPA” 102). The SPA contains one or more high performance general purpose sequential processing units that are designed to execute sequential instructions on sequential data. The PPA contains one or more groups of homogeneous general purpose SIMD multiprocessors 107 that are designed to operate on highly parallel problems where many processors can work in parallel. The SPA and PPA each has access to one or more physical RAMs (Random Access Memory) 103 and 104, respectively, and are connected together by a high speed bi-directional data and communication bus 105.

Each multiprocessor 107 contains one or more SIMD (Single Instruction Multiple Data) processors, and also contains a memory cache (illustrated as RAM but may be other types of cache) 115 allowing fast access and communication between each SIMD processor in the multiprocessor. There is also, in the illustrated embodiment, a random access memory (RAM 104) shared by all multiprocessors in the array 102, that store the video frames, macroblock coefficient data, macroblock metadata, and multiprocessor instructions. There is a PPA sequencer and memory arbiter 106 to automatically and efficiently select processors to execute a set of instructions 114. Each multiprocessor can process batches of instructions and one batch is executed after the other. The scheduler selects batches of instructions for each multiprocessor. If, and when, a multi-processor is instructed to wait for memory or a synchronization event, the scheduler will swap in new instructions to execute on that processor.

Decode Method

One aspect of the present invention involves using two methods or processes in parallel to efficiently apply processing resources to decode or encode block-based video data. We use the term “parallel” to refer to processes that generally run concurrently, in a coordinated fashion. We do not use the term to require a strict step by step, or clock by clock parallelism. The following description is for decoding, but it can be applied to encoding in a similar manner as further explained below.

The first of the pair of methods we will call Parallel Variable Length Decode or “PVLD.” As the name implies, this method applies parallel processing to the variable-length decoding aspect of video decoding. It decompresses a video frame of a variable length inter-block dependant encoded stream 116, and produces an independent variable length macroblock coefficient data buffer 110 and a fixed size macroblock metadata buffer 111. This data, for one frame in a preferred embodiment, is then copied to the PPA's RAM memory 104 through the high speed communication bus 105. In an alternative embodiment, a memory address can be sent to the PPA 107, for example in the case of a single shared RAM device (not shown).

The second process of the pair we will call Parallel Block Decode or “PBD.” The PBD process decompresses each macroblock by decoding the run-length compressed coefficient data using the metadata and using stored reference frames 112. The output of this method is the desired output video frame 113. As soon as the data is copied to the PPA, the SPA can start on the next frame, thus the first method PVLD in a preferred embodiment is always decompressing one frame ahead of the second method, the PBD. Since both methods are running in parallel and both of these processes make use of many processors (in array 101 and array 102, respectively, the speed and efficiency of decoding an entire video stream is greatly improved compared to prior solutions.

Referring again to FIG. 1, the coefficient data buffer (110 and 117) contains a run length encoded version of the frequency coefficients representing the residual data from the prediction, and the metadata buffer contains other properties of each macroblock that instruct the multiprocessors in the PPA how to decode each macroblock. Buffer 110 contains the coefficient data, or is accumulating that data, for a Frame “n+1” when the PPA buffer 117 is working on decoding the coefficient data from the last (i.e., the next preceding) Frame n. As noted, the SPA starts on the next frame of data as soon as it stores a completed frame of coefficient data in the buffer 117 for the PPA to conduct PBD. In this embodiment, there is no harm if the block decode in the PPA temporarily falls behind, as the next frame data can wait in the buffer. However, it need not wait for a full frame of data to begin processing macroblocks.

Processing Slices of Macroblock Data

As discussed in the background section, slices can be decoded independently of other slices. Slices also contain blocks that are dependent on other blocks in the slice and are best decoded sequentially; therefore, in a preferred embodiment, each slice is decoded using a sequential processor 108, but more than one slice can be decoded in parallel using a group of sequential processors 101. Each sequential processor 108 in the SPA decodes an assigned slice, and outputs the independent coefficients and metadata into another array for use in the second process (PBD). If there are not enough sequential processors for all slices of a frame, slices may be assigned, for example in a round-robin fashion, until all slices are decoded.

Slices of data are variable in byte length due to the nature of the variable length encoding as well as the amount of compression due to prediction for each slice, however. To accommodate this aspect, a process is illustrated in FIG. 2 to pre-process the data in such a way that a frame of video can be decoded in parallel using multiple sequential processors. 201 shows the variable sized slices packed in a buffer. This buffer contains the encoded bits from the video stream with all slices packed together. The data is pre-processed by finding the point in the buffer where each slice begins and the pointers for each slice are stored in an index array shown in 202. This index array is then read by the each processor in the SPA (203) to find the location of the slice that each processor is responsible for decoding. Once the set of macroblocks in each SPA processor's array has been VLC decoded to coefficients and meta data, the resulting (RLE compressed) coefficients and metadata for each block in a slice is stored in an array (204 and 205 respectively and 117 and 118 respectively). Another index table is used to tell each processor in the PPA where each macroblock is located in the coefficient buffer (204). In the case of this invention, the index table is stored at the top of the coefficient buffer for convenience. Each processor in the PPA then reads the address offset for the macroblock data that it is responsible for decoding from this table as shown in (117).

Once all the slices have been decoded, the decompressed slice data is sent to the PPA for the PBD and decoding of the next frame of slices can be started on the SPA. Since each macroblock in the PBD is independent of other macroblocks, many more processors can be applied to decompressing all of the blocks in parallel.

Each processor in a multiprocessor communicates through a RAM that is local to the group of processors. Each processor's function depends on the macroblock decoding phases.

In some cases, such as high bit rate video decoding or encoding, some of the sequential decoding or encoding in the PVLD could be offloaded to the PPA. In some embodiments, where this capability is implemented, the decision depends on which phase of the codec is the bottleneck in the system. A methodology for making this determination for load balancing is described in the next section.

Load Balancing to Optimize Throughput

To properly load balance the system using the PPA and the SPA the system must calculate the theoretical performance (for example, in frames per second) of the different processor load distributions using various inputs and some pre-calibrated constants. The following is a sample calculation.

Let:

Ns=# of processors for SPA Np=# of processors for PPA Cs=clock rate of one of the processors in either the SPA and PPA (assume all have the same clock rate) Cp=clock rate of one of the processors in the PPA (assume all have the same clock rate) Cts=available clock rate per array of SPA processors=Cs*MIN(Ns, # slices in the video) Ctp=available clock rate per array of PPA processors=Cp*MIN(Np, # slices in the video) B=bits per frame of a video stream (initial value set to avg bitrate/FPS and then continuously refined by analyzing previously processed frames and frame type) P=total pixels in video frame T=transfer rate of high speed bus Ks=SPA processor clocks per bit for a given system found experimentally or by calibration, and may be different depending on I, P or B frames Kp=PPA processor clocks per bit for a given system found experimentally or by calibration, and may be different depending on I, P or B frames Kpp=PPA processor clocks per pixel for a given system found experimentally or by calibration, and may be different depending on I, P, or B frames.

First, the theoretical time for VLC decode or encode in the SPA and PPA is calculated using this equation:

Tvs=B*Ks/Cts

The PPA calculation is this equation.

Tvp=B*Kp/Ctp

The transfer time is calculated by this equation: Tt=B/T for both the more compressed VLC representation, and the Metadata/Coefficient representation of the frame. B changes depending on the VLC representation or the Metadata/Coefficient representation.

The pixel processing time is calculated by a new K and a new Ct:

Ctp=Cp*MIN(Np,# Macroblocks in the frame)

Tpp=P*Kpp/Ctp

The total FPS is then defined by:

1/(Tvs+Tt+MAX(Tpp−Tvs, 0)) when running the PPA and SPA in parallel or; 1/(Tvp+Tt+Tpp) when offloading the VLC processing to the PPA.

These two values are compared and the proper load balancing is chosen based on the better theoretical performance.

A calculation of this type can be run on every frame and variables B, Ks, Kp, and Kpp can be refined based on actual frame processing times vs calculated. B preferably is constantly updated based on historical values and the frame type (such as I, P or B frames). K may also be adjusted based on the historical values of real vs theoretical performance.

Tables 1, 2 and 3 Below Show Examples of Sample Results.

This example shows the difference of processing the VLC decode using the PPA vs the SPA and why decoding the VLC step on the 16 processor PPA can achieve a higher overall performance than a 4 processor SPA despite each PPA having a much smaller clocks/second value and a longer transfer time per frame. Processing the VLC on the PPA achieves a 74 frames per second overall performance where the SPA achieves a 60 frames per second overall performance. In this case, the system would execute the VLC decode on the PPA instead of the SPA. A new clock/bit measurement and clock/pixel measurement may then be calculated to determine how the next frame will be decoded.

TABLE 1 Stream Properties 7.50E+07 bps average Bits/sec 30 FPS Frames per second 30 Slic# # slices 25769803776 T transfer rate bits/sec 2.50E+06 Bv average VLC encoded bits/frame 8.33E+06 Br average RLE encoded bits/frame 1920 X Res X 1080 Y Res Y 2073600 Total pixels

TABLE 2 SPA 4 Ns Number of Processors Cs Clock rate per each processor Clocks/second 2.40E+09 Ks clock/bit constant 9.60E+09 Ct Total clock rate for SPA 1.61E−02 Tvs processing time for 1 frame in SPA in seconds 9.70E−05 Ttv Transfer time VLC 3.23E−04 Ttr Transfer time RLE FPS if VLC done in SPA 60.71937 FPS

TABLE 3 PPA 16 Ns Number of Processors 1.50E+09 Cs Clock rate per each processor Clocks/second 62 Kp clock/bit constant 2.40E+10 Ct Total clock rate for PPA 80 Kx Clock/pixel constant 6.46E−03 Tvp VLC processing time for 1 frame in PPA in seconds 6.91E−03 Txp Pixel processing time for 1 frame in PPA in seconds FPS if VLC 74.25368 FPS done in PPA

Encoding Video Data

The encoding of video is accomplished in a similar way, but in reverse. The video frames are first placed in to the PPA's RAM memory 104 through a second file decoding process, or a memory copy from a capture device such as a camera. The PPA then executes various pixel processes of an encoder resulting in coefficients. These processes include Intra and Inter prediction, mode selection, motion estimation, motion compensation, DCT and IDCT, Quantization and inverse Quantization.

The resulting coefficients and metadata is then placed into an array similar to 204 and 205 for further processing by the SPA. The SPA then takes the coefficient and meta data and encodes using a variable length coding process (VLC) resulting in a video stream. If there are multiple slices in the picture, the SPA can process each slice in parallel resulting in higher overall performance.

It will be obvious to those having skill in the art that many changes may be made to the details of the above-described embodiments without departing from the underlying principles of the invention. The scope of the present invention should, therefore, be determined only by the following claims. 

1. A system for decompressing a compressed video data stream comprising: a sequential processor array (101) comprising at least one sequential processor and arranged to receive a video data input stream; a parallel processor array PPA (102) comprising a plurality of parallel multi-processors; a data bus 105 interconnecting the sequential processor array (101) and the parallel processor array PPA (102); a first RAM memory (103) coupled to the sequential processor array (101) to store SPA program instructions, Macroblock coefficient data and Macroblock metadata; and a second RAM memory (104) coupled to the parallel processor array PPA (102).
 2. A system for decompressing a compressed video data stream according to claim 1 wherein the second RAM is arranged for storing PPA program instructions and Macroblock coefficient data, macroblock metadata, reference frame data and output video frame data.
 3. A system according to claim 1 wherein the multi-processors comprise SIMD processors.
 4. A system according to claim 1 wherein: the first RAM and the second RAM are realized in a single shared RAM; and the PPA has access to the shared RAM to read the said stored macroblock coefficient data and macroblock metadata.
 5. A system according to claim 1 wherein the system is implemented in a single semiconductor integrated circuit.
 6. A system according to claim 1 wherein: the sequential processor array comprises a single semiconductor integrated circuit; and the parallel processor array comprises a second semiconductor integrated circuit.
 7. A system according to claim 1 wherein the parallel processor array comprises a stream processor integrated circuit.
 8. A method for decompressing a variable length inter-block dependent compresses video input data stream wherein the input data stream comprises macroblocks, the method comprising: in a first main process (Parallel Variable Length Decode or PVLD); decompressing a first video frame of the input data stream (116); producing a first independent variable length coefficient data set (110) responsive to the first video frame data; producing a first fixed-size metadata data set (111) responsive to the first video frame data; and storing the first coefficient data set and the first fixed-size metadata data set in memory; and in a second main process (Parallel Block Decode or PBD), executing substantially in parallel with the first main process decompressing the macroblocks of the input data stream by decoding the stored first run-length compressed coefficient data using the stored first metadata data set and using at least one previously-stored reference frame (112), so as to generate a desired output video frame (113).
 9. A method according to claim 8 including: commencing execution of the first main process on a second frame of input data as soon as said storing of the first frame data is completed, so that the [Parallel Variable Length Decode or PVLD] first main process is decompressing one frame ahead of the second main process [Parallel Block Decode or PBD].
 10. A method according to claim 9 including executing the first main process [Parallel Variable Length Decode or PVLD] on one or more sequential processors.
 11. A method according to claim 10 including executing the second main process [Parallel Block Decode or PBD] on a plurality of multi-processors.
 12. A method according to claim 10 including executing the second main process [Parallel Block Decode or PBD] in an array of multi-processors.
 13. A method according to claim 10 wherein the second main process decodes substantially all of the macroblocks of the current frame concurrently.
 14. A method according to claim 12 wherein said storing the first coefficient data set and the first fixed-size metadata data set includes storing the data in a shared memory space accessible to the array of multi-processors.
 15. A method according to claim 9 and further comprising: encoding the frequency coefficient data using a selected run length coding; and wherein the coefficient data represents the residual data generated from predicting a next macroblock of data.
 16. A method according to claim 9 and further wherein the metadata set contains properties of each macroblock that instruct the multi-processors in the PPA for decoding each macroblock.
 17. A method according to claim 16 wherein the said properties of each macroblock (stored in the metadata set) that instruct the multi-processors in the PPA for decoding each macroblock include at least coded block pattern, prediction modes, quantization parameter, and motion vectors.
 18. A method for decompressing a variable length inter-block dependant encoded video input data stream wherein the input data stream comprises macroblocks, the method comprising: in a first main process [Parallel Variable Length Decode or PVLD] decompressing a first video frame of the input data stream; producing a first macroblock coefficient data set responsive to the first video frame data; producing a first macroblock metadata data set responsive to the first video frame data; and storing the first macroblock coefficient data set and the first macroblock metadata data set; and in a second main process method [Parallel Block Decode or PBD], executing substantially in parallel with the first main process; decompressing the macroblocks of a previous frame of the same input data stream.
 19. A method according to claim 18 and further comprising, immediately after storing the first macroblock coefficient data set and the first macroblock metadata data set, beginning decompressing a second video frame of the input data stream.
 20. A method according to claim 18 wherein said first main process includes: providing an array of sequential processors; and decompressing a slice of the first video frame of the input data stream in a selected one of the sequential processors of the array so as to form the corresponding macroblock coefficient data set.
 21. A method according to claim 20 including: decoding more than one slice of the first video frame substantially in parallel, each slice processed in a selected one of the sequential processors of the array.
 22. A method according to claim 20 including: assigning slices to an available processor of the array in a round-robin fashion until all slices of the frame are decoded.
 23. A method according to claim 20 including: storing each slice of the frame sequentially into a slice data buffer; and creating an index table to indicate a beginning address in the slice data buffer for each slice of the frame data for use by the corresponding assigned sequential processor.
 24. A method according to claim 23 including storing a marker at the end of each slice in the slice data buffer to tell the processor that there is no more data in the slice.
 25. A method according to claim 23 wherein the macroblock metadata for each macroblock includes at least one of (a) Macroblock type (intra or inter, field information, partitions), (b) Motion vectors for the macroblock and all its partitions, and (c) Quantization parameter (how much is the block quantized).
 26. A method according to claim 23 wherein decompressing the macroblocks in the second main process includes: providing an array of parallel processors all coupled to a common memory; and decompressing a plurality of the macroblocks in parallel by decompressing each macroblock of the plurality in a respective one of the array of parallel processors.
 27. A method according to claim 26 wherein the parallel processor array comprises a plurality of Parallel SIMD Multi-processors.
 28. A method according to claim 26 wherein the parallel processor array comprises a stream processor having internal shared memory.
 29. A series of machine-readable instructions stored in machine readable media for execution on a plurality of digital processors for video decoding, including: first code arranged for execution on an array of sequential processors (SPA); and second code arranged for execution on an array of multi-processors (PPA); wherein: the first code includes code for transferring data to a memory means accessible to the array of multi-processors (PPA); the first code upon execution the causes the sequential processor array to produce macroblock data and store the macroblock data into the memory means; the second code upon execution causes the multi-processor array to decode the stored macroblock data produced by the sequential processor array.
 30. A series of machine-readable instructions stored in machine readable media according to claim 29 wherein the data produced by the first code comprises a macroblock coefficient data set (110) responsive to a first frame of video input data.
 31. A series of machine-readable instructions stored in machine readable media according to claim 30 wherein the data produced by the first code further comprises a macroblock metadata set responsive to the first frame of video input data.
 32. A series of machine-readable instructions stored in machine readable media according to claim 31 wherein the second code, upon execution, decompresses the macroblocks of the input data stream by decoding the stored run-length compressed first coefficient data using the stored first metadata data set and using at least one previously-stored reference frame, so as to generate a desired output video frame.
 33. A series of machine-readable instructions stored in machine readable media according to claim 31 wherein the first code recovers macroblock data of a first frame of input data, stores the recovered data into memory for further processing by the second code, and begins recovering macroblock data from a second frame of input data immediately after said storing the first frame data into memory, so that the first code and the second code operate concurrently rather than sequentially.
 34. A method of operation of a two-phase CODEC for processing video data, the method comprising the steps of: providing a sequential processor array SPA (101) comprising at least one sequential processor and arranged to receive a video data input stream; providing a parallel processor array PPA (102) comprising a plurality of parallel multi-processors; providing a data bus (105) interconnecting the sequential processor array (101) and the parallel processor array PPA (102); receiving a compressed video input stream; analyzing a current frame of the compressed video input stream; estimating a first decode time for the current frame if an initial VLC decode of the frame were conducted in the SPA, followed by decoding the macroblocks in the PPA; estimating a second decode time for the frame if the compressed video input stream were transferred to the PPA for both initial VLC decode and decoding the recovered macroblocks in the PPA; and then comparing the first and second decode times to select the faster process for the current frame.
 35. A method according to claim 34 wherein said estimating a first decode time for the current frame includes calculating a theoretical decode time as: Tvs=B*Ks/Cts, where B=approximate bits per frame of the video stream, Ks=approximate SPA processor clocks per bit for the CODEC system, and Cts=available clock rate per array of SPA processors=Cs*MIN(Ns, # slices in the videoframe), where Cs=clock rate of one of the processors in either the SPA and PPA (assume all have the same clock rate) and Ns=# of processors for the SPA.
 36. A method according to claim 34 wherein said estimating a second decode time for the current frame includes calculating a theoretical decode time in the PPA as Tvp=B*Kp/Ctp, where B=approximate bits per frame of the video stream, Kp=PPA processor clocks per bit for a given system [found experimentally or by calibration, and may be different depending on I, P or B frames]; and Ctp=available clock rate per array of PPA processors=Cp*MIN(Np, # slices in the video), where Cp=clock rate of one of the processors in the PPA (assume all have the same clock rate).
 37. A method according to claim 34 and further including transferring a frame of data to the PPA for both initial VLC decode and decoding the recovered macroblocks, responsive to the said comparing the first and second decode times to select the faster process for the current frame.
 38. A method according to claim 34 and further including repeating said comparison step on a frame-by-frame basis to optimize load balancing as between the PPA and the SPA.
 39. A method according to claim 34 and further including repeating said comparison step on a periodic basis to optimize load balancing as between the PPA and the SPA.
 40. A method according to claim 34 and further including a step of estimating a cost for transferring a frame of data to the PPA for both initial VLC decode and decoding the recovered macroblocks. 